package com.hgw.Demo03_DecoratorPattern.decorator;

/**
 * Data time:2021/12/14 16:53
 * StudentID:2019112118
 * Author:hgw
 * Description: 测试类
 */
public class Client {
    public static void main(String[] args) {
        FastFood food = new FriedRice();
        System.out.println(food.getDesc() + "共消费：" + food.cost() + "元人民币");

        System.out.println("========加菜========");
        food = new Egg(food);
        food = new Bacon(food);
        System.out.println(food.getDesc() + "共消费：" + food.cost() + "元人民币");
    }
}
